package cn.tedu.m1;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//消费者(自动注册,连接服务器,开启消息监听)
@Component
public class Consumer {

    @RabbitListener(queues = "helloword")
    public void getRabbit(String msg){
        System.out.println("收动消息:"+msg);
    }
}
